<!--
 * @Description: 入口页面
 * @Author: Liu Zhiwang
 * @Date: 2021-03-27 14:34:20
 * @LastEditTime: 2021-04-29 10:23:19
 * @LastEditors: Liu Zhiwang
-->
<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>

export default {
  name: 'App',
  mounted() {
    this.watchPageChangePageZoom() // 监听页面大小变化调整缩放
  },
  methods: {
    // 监听页面大小变化调整缩放
    watchPageChangePageZoom() {
      window.onresize = () => {
        return (() => {
          this.$store.dispatch('settings/changePageZoom', {
            key: 'pageZoom',
            value: document.body.clientWidth / 1920
          })
        })()
      }
    }
  }
}
</script>
